package com.lemon.system.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 用户表持久层对象，对应数据库
 *
 * @author 李猛
 * @since 2024-02-11
 */
@Getter
@Setter
@ToString
@TableName("sys_user")
public class UserPO implements Serializable {

    private static final long serialVersionUID = 1L;

    //主键ID
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    //租户ID
    private Long tenantId;

    //部门ID
    private Long deptId;

    //用户名
    private String username;

    //密码
    private String password;

    //姓名
    private String name;

    //手机号
    private String phone;

    //邮箱
    private String email;

    //生日
    private LocalDate birthday;

    //头像地址
    private String avatar;

    //省ID
    private Long provinceId;

    //市ID
    private Long cityId;

    //县ID
    private Long countyId;

    //地址
    private String address;

    //最后登录的IP
    private String lastLoginIp;

    //最后登录的时间
    private LocalDateTime lastLoginTime;

    //创建人
    private String createBy;

    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    //修改人
    private String updateBy;

    //修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    //状态 1正常 0异常
    private Boolean status;

    //删除状态 1是 0否
    @TableLogic
    private Boolean deleted;


}
